-
Couldn't load subscription status.
- Fork 186
Adding HasCallStack to Partial functions #1160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Do you have any recommendations for running benchmarks? I ran all of the benchmarks three times and got wildly different results each time. Ideally I'd run all of them one set at a time... I guess I can manually stack the commands for that. I await further guidance. |
|
Hi, I need some time to review this, since I need to first understand how About the benchmarks, what have you tried? I would run the benchmarks for the changed functions using tasty patterns, e.g. (See also CONTRIBUTING.md) |
|
I ran I can certainly try running individual benchmarks; in that case I'll probably try doing "run each benchmark component individually". |
|
@meooow25 , the constraints are used in |
|
One common source of benchmark noise is other processes taking up CPU, like a browser. In case you haven't tried already, running benchmarks on a fresh boot helps reduce interference from background processes. And if you think there could be something weird going on you can ask for someone else to try it too to gather more data. (I'd be happy to volunteer here.) |
|
FWIW, I always run |
|
Here are the results of benchmarking all the benchmarks in order one after the other: https://gist.github.com/L0neGamer/d0722ef0aea167684d87b63f786bb33f Here are the percentage differences of the end results of each: However, the last result was a difference of 3 seconds so is probably just a little swingy, especially as all of the results in that one are better in the hascallstack run. Benchmarks are performed with a bunch of things killed, and running the below script: |
|
It needs to calculate the standard deviations (also known as expected error, or volatility) to see if they're within margin per bench suite. But I think these are kind of excessive. Nobody complained about adding callstack to unordered containers, so I doubt they will if it's added here. And if they do just revert the ones they complain about 😅 |
What do you mean by "end results"? Are you comparing total time as reported in "All XX tests passed"? This would make little sense. Could you use |
|
I'll look into running each of those later. Would the maintainers be interested if I took this opportunity to add the |
A no from me on that, sorry. I find the warnings on |
|
I don't think people should have to program with the documentation open necessarily. I think the thing with these warnings is that they're guards for beginner work or corporate codebases. For the average project or small proof of concept of a competent haskeller, they're annoying, but they help ensure code quality by stopping exceptions before they can happen. In any case where you "know a value should be in a map" or similar, that function is always one refactor away from having a ticking time bomb of an exception going off. This doesn't feel very "fearless refactoring" to me. If a user wants to use these potentially unsafe and throwy functions, they are more than able to ignore the warnings or turn them off. But for those that want to program safely, we have no choice but to try and stay vigilant all the time. |
|
Been a bit busy, here are the results from running a baseline on master, then running against that baseline on this PR: I count 1008 "same as baseline", 97 "more than baseline" (average ~16%), and 71 "less than baseline" (average ~14%). in both cases, I cabal cleaned, cabal built all, then ran a script similar to what I posted before but modified to output the csvs, and to then measure against the baseline, and in neither case was I doing anything else on my computer (and nothing else was open). |
|
As much as I would love to add |
continuing the work of #493
Not yet ready for merging, I want to try and run the benchmarks in a reliable way.